﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="query.aspx.cs" Inherits="AnyOffice.general.address.public1.query" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>query</title>
    <meta content="C#" name="CODE_LANGUAGE">
    <meta content="JavaScript" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    <script>
        function add_detail(address_id) {
            URL = "address_detail.aspx?address_id=" + address_id;
            myleft = (screen.availWidth - 500) / 2;
            window.open(URL, "detail", "height=550,width=400,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=50,left=" + myleft + ",resizable=yes");
        }

        function delete_add(address_id) {
            msg = '确认要删除该联系人么？';
            if (window.confirm(msg)) {
                URL = "address_delete.aspx?address_id=" + address_id + "&group_id=0";
                window.location = URL;
            }
        }

    </script>
</head>
<body class="bodycolor" topmargin="5">
    <form id="Form1" method="post" runat="server">
    <table class="small" cellspacing="0" cellpadding="3" width="100%" border="0">
        <tr>
            <td class="Big">
                <img src="/images/menu/address.gif" align="absMiddle"><span class="big3">&nbsp;<asp:Literal
                    ID="litNavName" runat="server" Text="联系人查询"></asp:Literal></span>
            </td>
        </tr>
    </table>
    <br>
    <asp:Panel ID="pnlMain" runat="server">
        <table class="small" cellspacing="1" cellpadding="2" width="400" align="center" bgcolor="#000000"
            border="0">
            <tr>
                <td class="TableData" nowrap>
                    分组：
                </td>
                <td class="TableData" nowrap>
                    <asp:DropDownList ID="ddlGroupId" runat="server" CssClass="BigSelect">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="TableData" nowrap>
                    负责人：
                </td>
                <td class="TableData">
                    <asp:TextBox ID="txtName" runat="server" CssClass="BigInput" Columns="10" MaxLength="50"></asp:TextBox>
                </td>
            </tr>
            <%--<tr>
                <td class="TableData" nowrap>
                    性别：
                </td>
                <td class="TableData">
                    <asp:DropDownList ID="ddlSex" runat="server" CssClass="BigSelect">
                        <asp:ListItem Value="all" Selected="True">所有</asp:ListItem>
                        <asp:ListItem Value="True">男</asp:ListItem>
                        <asp:ListItem Value="False">女</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>--%>
            <%-- <tr>
                <td class="TableData" nowrap>
                    昵称：
                </td>
                <td class="TableData">
                    <asp:TextBox ID="txtNickName" runat="server" CssClass="BigInput" Columns="25" MaxLength="50"></asp:TextBox>
                </td>
            </tr>--%>
            <tr>
                <td class="TableData" nowrap>
                    机构名称：
                </td>
                <td class="TableData">
                    <asp:TextBox ID="txtDeptName" runat="server" CssClass="BigInput" Columns="25" MaxLength="50"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="TableData" nowrap>
                    机构地址：
                </td>
                <td class="TableData">
                    <asp:TextBox ID="txtDeptAddr" runat="server" CssClass="BigInput" Columns="25" MaxLength="50"></asp:TextBox>
                </td>
            </tr>
            <%--<tr>
                <td class="TableData" nowrap>
                    家庭住址：
                </td>
                <td class="TableData">
                    <asp:TextBox ID="txtHomeAddr" runat="server" CssClass="BigInput" Columns="25" MaxLength="50"></asp:TextBox>
                </td>
            </tr>--%>
            <tr>
                <td class="TableData" nowrap>
                    备注：
                </td>
                <td class="TableData">
                    <asp:TextBox ID="txtNote" runat="server" CssClass="BigInput" Columns="25" MaxLength="50"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="TableControl" nowrap align="center" colspan="2">
                    &nbsp;
                    <asp:Button ID="btnSubmit" runat="server" CssClass="BigButton" Text="查询"></asp:Button>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlQuery" runat="server" Visible="False">
        <asp:Repeater ID="rptAddress" runat="server" EnableViewState="False">
            <HeaderTemplate>
                <table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
                    <tr class="TableHeader">
                        <td nowrap align="center">
                            机构名称
                        </td>
                        <td nowrap align="center">
                            负责人
                        </td>
                        <td nowrap align="center">
                            联系电话
                        </td>
                        <td nowrap align="center">
                            值班电话
                        </td>
                        <td nowrap align="center">
                            手机
                        </td>
                        <td nowrap align="center">
                            机构地址
                        </td>
                        <td nowrap align="center">
                            操作
                        </td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="TableLine1">
                    <td nowrap align="center">
                        <a href="javascript:add_detail('<%#Eval("AddressId")%>');">
                            <%#Eval("DeptName")%></a>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("Name")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("DeptTel")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("DeptFax")%>
                    </td>
                    <td nowrap align="center">
                        <a title="发送手机短信" href="/general/mobile/new.aspx?mobile=<%#Eval("Mobile")%>">
                            <%#Eval("Mobile")%></a>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("DeptAddr")%>
                    </td>
                    <td nowrap align="center" width="100">
                        <a href="javascript:add_detail('<%#Eval("AddressId")%>');">详情</a>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="TableLine2">
                    <td nowrap align="center">
                        <a href="javascript:add_detail('<%#Eval("AddressId")%>');">
                            <%#Eval("DeptName")%></a>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("Name")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("DeptTel")%>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("DeptFax")%>
                    </td>
                    <td nowrap align="center">
                        <a title="发送手机短信" href="/general/mobile/new.aspx?mobile=<%#Eval("Mobile")%>">
                            <%#Eval("Mobile")%></a>
                    </td>
                    <td nowrap align="center">
                        <%#Eval("DeptAddr")%>
                    </td>
                    <td nowrap align="center" width="100">
                        <a href="javascript:add_detail('<%#Eval("AddressId")%>');">详情</a>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <asp:Literal ID="litMessage" runat="server"></asp:Literal>
        <br>
        <center>
            <input class="BigButton" onclick="window.location='query.aspx';" type="button" value="返回"></center>
    </asp:Panel>
    </form>
</body>
</html>
